All Questions
5 questions
3votes
1answer
797views
Python - A Regex Text File Searcher by Content Project
I would like some advice on efficiency and ways to further remove redundant code. Regex Text File Search: enter a valid directory path, and a string to search for makes a list containing all the ...
13votes
2answers
5kviews
Average spam confidence
Exercise 7.2 from Python for Informatics: Write a program to prompt for a file name, and then read through the file and look for lines of the form: ...
3votes
1answer
5kviews
Compress and decompress a string from a file
I need to compress some text, I'm wondering if my program could be made more efficient. The only things I could think of would be the 'import re' and turning the filename input and read part as a ...
3votes
1answer
107views
Inserting filename, reading data, inserting regex, and testing if each line matches - version 2
This is a improved version of the program seen in my older question. This program first displays a menu which shows some options that the user can select. Each option will the respective functions ...
6votes
1answer
113views
Inserting filename, reading data, inserting regex, and testing if each line matches
This program first displays a menu which shows some options that the user can select. Each option will the respective functions which do some things. The user can insert a filename, read data from it,...